<div class="invertedshiftdown">
		
		<ul>
			<li class="current"><a href="?page=manage_users">用户管理</a></li>
			<li><a href="?page=manage_organizations">机构管理</a></li>
			<li><a href="?page=manage_items">产品管理</a></li>
            <li><a href="?page=manage_transaction">撤销错误记录（慎用）</a></li>
 		</ul>

        <form id="myform">
			<input type="text" class="textinput" /> <input class="submit" type="submit" value="搜索" />
		</form>
	</div>
	<br style="clear: both;" />

	<div class="block">

<div id= 'content'>
	<h2>用户管理》更改用户:<?php echo $user->name?>（仅限职位与权限）：</h2>
	
<br>

<div class="done" style="display:none;">
<b>操作成功</b>

</div>
<div>
	    <div class="form">
	    	<b>更改列表</b>
	        <form action="api/" method="post">
	        	<input type="hidden" id='action' name="action" value="alter_user" />
	        	<input type="hidden" id='id' name="id" value=<?php echo $user->id?> />
	
	
	   <div class="element" style="clear:both;">
	        <label class="form">权限</label>
	        
	        <div class='checkbox'>
	        	  	 <input type="radio" name="authority" value="none">无权限 (学员，仅开放有限的略览权限)<br>
 					 <input type="radio" name="authority" value="pick" checked="checked">选择 (可多选)<br>
				    <div>
				    <?php
				    foreach($allOrganizations as $organization){
				    		$organization->name;
					
					    if(!in_array($organization->id,$user->authority)){
					    	
					    ?>
					    <input type="checkbox" name="pick[]" value="<?php echo $organization->id;?>"><?php echo $organization->name;?><br>
					    <?php
						}else {
					    ?>
					    <input type="checkbox" name="pick[]" value="<?php echo $organization->id;?>" checked="checked"><?php echo $organization->name;?><br>
						<?php
						}
						
				    }

				    if(in_array("management",$user->authority)){
				    
				    ?>
				        <input type="checkbox" name="pick[]" value="management" checked="checked">管理<br>
				    <?php
					}else{
				    ?>
				        <input type="checkbox" name="pick[]" value="management">管理<br>
				    <?php
					}
				 
				    if(in_array("accounting",$user->authority)){
				    
				    ?>
					    <input type="checkbox" name="pick[]" value="accounting" checked="checked">会计<br>
					<?php
					}else{
				    ?>
					    <input type="checkbox" name="pick[]" value="accounting">会计<br>
				  	<?php
					}
				    ?>
	    </div>
	  
	     </div>
	
	    </div>

	
	    <div class="element">
		<input type="submit" value="递交" />
	        <div class="loading"></div>
	    </div>
	    </form>
	 
	    </div>
	
    </div>
    </div>
<div class="clear"></div>
	</div>